﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AzureProvider.SoupMethods.MiniSensor;
using AzureProvider.MiniSensor;

namespace AzureBlogWebRole.admin.Pages
{
    public partial class Channels : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Bt_add_Click(object sender, EventArgs e)
        {
            AzureProvider.MiniSensor.Channel ch = new AzureProvider.MiniSensor.Channel
            {
                Author = Page.User.Identity.Name,
                Id=Guid.NewGuid(),
                Name = TextBox1.Text
            };
            AzureProvider.MiniSensor.Channels ChM = new AzureProvider.MiniSensor.Channels();
            ChM.InsertChannel(ch);
            GridView1.DataBind();
            HttpRuntime.Cache["widget_channels"] = null;
        }
    }
}
